﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace ConceptionLogiciel_Devoir1
{
    public partial class formMain : Form
    {
        public formMain()
        {
            InitializeComponent();
        }

        private void formMain_Load(object sender, EventArgs e)
        {
            //loadUcLocation();
            loadUcRetour();
            desactiveBtn();
        }

        private void loadUcLocation()
        {
            var ucControl = new ucLocation();
            panel1.Controls.Clear();
            panel1.Controls.Add(ucControl);
        }

        private void loadUcRetour()
        {
            var ucRetour = new ucRetour();
            panel1.Controls.Clear();
            panel1.Controls.Add(ucRetour);
        }

        private void btnRetour_Click(object sender, EventArgs e)
        {
            loadUcRetour();
        }

        private void btnLocation1_Click(object sender, EventArgs e)
        {
            loadUcLocation();
        }

        private void desactiveBtn()
        {
            btnActivite.Enabled = false;
            btnClients.Enabled = false;
            btnDeconnexion.Enabled = false;
            btnFiche.Enabled = false;
            btnOffre.Enabled = false;
            btnStats.Enabled = false;
            btnUtilisateur.Enabled = false;
            btnVehicule.Enabled = false;
            btnRetard.Enabled = false;
        }

    }
}